Skip to content

fix: use authMode apiKey for Ollama provider to avoid streamSimple crash (#3440)#3443

Closed
Codergoterrors wants to merge 1 commit intogsd-build:mainfrom
Codergoterrors:fix/ollama-authmode-streamSimple-crash
Closed

fix: use authMode apiKey for Ollama provider to avoid streamSimple crash (#3440)#3443
Codergoterrors wants to merge 1 commit intogsd-build:mainfrom
Codergoterrors:fix/ollama-authmode-streamSimple-crash

Conversation

@Codergoterrors
Copy link
Copy Markdown

Fixes #3440

Problem

model-registry.ts line 699 now requires streamSimple when
authMode is "none". The Ollama extension registers with
authMode: "none" but no streamSimple handler → crash when
opening /model selector with Ollama running.

Fix

Switch Ollama's provider registration to authMode: "apiKey" with
a dummy apiKey: "ollama". Ollama ignores authentication entirely,
so this has zero functional impact but satisfies the new validation.

Testing

  • TypeScript build passes with zero errors
  • No changes to Ollama's actual HTTP requests or auth behavior

…ash (gsd-build#3440)

authMode 'none' now requires a streamSimple handler in model-registry.ts.
Ollama doesn't provide one, causing a crash when opening /model selector.

Fix: switch to authMode 'apiKey' with a dummy apiKey value of 'ollama'.
Ollama ignores authentication keys entirely, so this has no functional
impact but satisfies the new validation in model-registry.ts line 699.
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 3, 2026

🔴 PR Risk Report — CRITICAL

Files changed 1
Systems affected 3
Overall risk 🔴 CRITICAL

Affected Systems

Risk System
🔴 critical Agent Core
🟠 high AI Providers
🟡 medium TUI Components
File Breakdown
Risk File Systems
🔴 src/resources/extensions/ollama/index.ts Agent Core, AI Providers, TUI Components

⚠️ Critical risk — please verify: state persistence, auth token lifecycle, agent loop race conditions, RPC protocol compatibility.

@github-actions github-actions Bot added bug Something isn't working High Priority labels Apr 3, 2026
@krishnaglick
Copy link
Copy Markdown

Modified my local CLI with this change and it resolved an issue I was having with logout. I have a local Qwen3 model that was apparently causing the issue.

What's interesting, or annoying, is I was trying to login and logout of my claude code session and this was blocking that.

@jeremymcs
Copy link
Copy Markdown
Collaborator

Note: PR #3425 also addresses this same Ollama streamSimple crash (#3440/#3424) with a different approach (adding a wrapper). These should be coordinated to avoid duplicate work. 🤖 Automated PR audit — 2026-04-04

@trek-e
Copy link
Copy Markdown
Collaborator

trek-e commented Apr 13, 2026

Thanks for the fix, @Codergoterrors. PR #3425 addresses this same crash but also includes the slash-command extension fallback fix and Ollama UI fixes. Recommending #3425 be merged and this PR closed to avoid duplicate work — the authMode: apiKey approach here is valid but the broader set of fixes in #3425 makes it the better candidate.

If you'd like to keep contributing, the non-image absolute path interception described in #2926 would be a good follow-on PR.

@trek-e
Copy link
Copy Markdown
Collaborator

trek-e commented Apr 13, 2026

Closing in favor of #3425, which addresses the same Ollama streamSimple crash with a more explicit wrapper and additionally fixes the slash-command extension fallback and Ollama UI issues. Thanks for the contribution!

@trek-e trek-e closed this Apr 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working High Priority

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Ollama extension crashes with "streamSimple is required" when opening /model selector (v2.59.0)

4 participants